package com.atguigu.util;

import lombok.Data;

@Data
public class Result {

    private boolean status;
    private String msg ;
    private Object data ;

    public static Result ok(Object obj){
        Result result = new Result();
        result.setStatus(true);
        result.setData(obj);
        return result;
    }

    public static Result error(String msg){
        Result result = new Result();
        result.setStatus(false);
        result.setMsg(msg);
        return result;
    }

}
